
<link href="__PUBLIC__/css/video-js.css" rel="stylesheet">
<div class="page-group">
	<div class="page" data-page="book_kind">
    <header class="bar bar-nav">
        <a onclick="window.history.go(-1);" class="icon" style="width: 40%">
            <img src="__PUBLIC__/img/iconfont_back@2x.png" class="back_img">
        </a>
    </header>
    <div class="content" >

		<!--<video controls="controls" style="width: 100%;height: 250px">-->
			<!--<source src="{$d.path}" type="video/ogg">-->
			<!--<source src="{$d.path}" type="video/mp4">-->
			<!--Your browser does not support the video tag.-->
		<!--</video>-->

		<!--<video id="example_video_1" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" style="width: 100%;height: 250px"-->
			   <!--poster="{$d.pic}"-->
			   <!--data-setup="{}">-->
			<!--<source src="{$d.path}" type='video/mp4'  />-->
			<!--<source src="{$d.path}" type='video/webm' />-->
			<!--<source src="{$d.path}" type='video/ogg' />-->
		<!--</video>-->
		{$d.path}
    	<div>
    		<div class="movie_name" style="background: #FFF url(__PUBLIC__/img/film_down@2x.png) no-repeat;padding: 10px;background-position: right;border-bottom: 1px solid #F5F5F5" onclick="openOrClose()">
    				{$d.title}
    		</div>
    		<div  class="movie_info" style="display:none">
    				<!--div>作者：新宇</div-->
    				<div>发布时间：{$d.create_time|strtotime|date="Y/m/d",###}</div>
    				<div>播放：{$d.video_log|sizeof}</div>
    				<div style="font-size: 12px;margin-top:10px">摘要：{$d.summary}</div>
    		</div>
    	</div>
    	<div style="background: #FFF">
    		 <div style="padding: 10px;border-bottom: 1px solid #F5F5F5">评论</div>
    		 <div style="text-align: center;padding: 10px;" id="area_comment">
    		 		<div style="background: url({$headimgurl}) ; width: 28px;height:28px;float: left;background-size:100% 100%;border-radius:50%"></div>
    		 		<input type="text" id="commentcontent" style="width: 75%;line-height:28px;height:28px;border:none;background: #F5F5F5;text-indent:10px" placeholder="我来评论">
    		 		<input type="button" value="发送" onclick="commentvideo({$d.video_id})" style="background: #F5F5F5;border:none;height:28px">
    		 </div>
    	</div>
    	<div style="padding: 10px;background: #FFF">
			<div id="comment_list">
				<volist name="d.video_apprise" id="v">
					<div style="background: url({$v.headimgurl}) ; width: 28px;height:28px;float: left;background-size:100% 100%;border-radius:50%"></div>
					<div style="width: 90%;margin-left: 30px;border-bottom: 1px solid #F5F5F5">
						<div style="font-size: 12px;margin-top:5px;color: #C8C8C8">{$v.nickname}</div>
						<div style="margin-top: 5px">{$v.content}</div>
						<div style="font-size: 12px;margin-top:5px;margin-bottom:10px;color:#ADADAD">{$v.create_time|strtotime|date="Y-m-d H:i:s",###}</div>
					</div>
				</volist>
			</div>

			<div style="text-align: center;margin-top:5px">
    				<input type="button" onclick="location.reload();"  value="查看评论" style="background: #F5F5F5;border:1px solid #F5F5F5;padding: 5px;width: 120px">
    		</div>
    	</div>
    	
     </div>
	<include file="Public:footer"/>
</div>
</div>
<script src="__PUBLIC__/js/video.js"></script>
<script>
//	videojs.options.flash.swf = "{$d.path}";
		var a=1;
		function openOrClose(){
			if(a%2==0){
				$(".movie_name").css("background","#FFF url(__PUBLIC__/img/film_down@2x.png) no-repeat");
				$(".movie_name").css("background-position","right");
				$(".movie_info").hide();
				a++;
			}else{
				$(".movie_name").css("background","#FFF url(__PUBLIC__/img/film_up@2x.png) no-repeat");
				$(".movie_name").css("background-position","right");
				$(".movie_info").show();
				a++;
			}
			a==1;
		}

	function commentvideo($video_id){
		var $content=$("#commentcontent").val();
		if(Trim($content)==""){
			$.alert("请填写评论");
			return;
		}
		$.post("{:U('Comment/post_video')}",{id:$video_id,content:$content},function(data){
			if(data.status=='success'){
				$.alert(data.data);
				$("#area_comment").html("已评论");
			}else{
				$.alert(data.data);
			}
		});
	}
</script>